package com.dev.utils.app.assist;


import com.dev.DevUtils;

public class ResourceRaw {

    private static volatile ResourceRaw sInstance;

    /**
     * 获取 ResourceAssist 实例
     * @return {@link ResourceRaw}
     */
    public static ResourceRaw getInstance() {
        if (sInstance == null) {
            synchronized (ResourceRaw.class) {
                if (sInstance == null) {
                    sInstance = new ResourceRaw();
                }
            }
        }
        return sInstance;
    }


    /**
     * 获取 Color
     * <pre>
     *     {@link #(, int)}
     * </pre>
     * @param colorId R.color.id
     * @return Color
     */
    public int getColor( final int colorId) {
        try {
          return DevUtils.getContext().getResourceManager().getElement(colorId).getColor();
        } catch (Exception e) {
           // LogPrintUtils.eTag(TAG, e, "getColor");
        }
        return -1;
    }

}
